<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
	<title>Search Resident</title>
	<link rel="stylesheet" href="<?php echo base_url();?>application/development-bundle/themes/swanky-purse/jquery.ui.all.css">
	<link rel="stylesheet" href="<?php echo base_url();?>application/development-bundle/demos/demos.css">
	<link rel="stylesheet" href="<?php echo base_url();?>application/css/style.css">
	<script src="<?php echo base_url();?>application/development-bundle/jquery-1.4.4.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.accordion.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.tabs.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.datepicker.js"></script>
		
	<script>
	$(function() {
		$( "#content" ).accordion({
			autoHeight: false,
			collapsible: true,
			active: false
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#dormitorystuffs" ).accordion({
			autoHeight: false,
			collapsible: true,
			active: false
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#navigation" ).accordion({
			autoHeight: false,
			collapsible: true
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#tabs" ).tabs();
	});
	</script>
	
	<script>
	$(function() {
		$( "#datepicker" ).datepicker({
			changeMonth: true,
			changeYear: true,
			dateFormat: 'yy/mm/dd',
			yearRange: '1950:2099'
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#datepicker2" ).datepicker({
			changeMonth: true,
			changeYear: true,
			dateFormat: 'yy/mm/dd',
			yearRange: '1950:2099'
		});
	});
	</script>
	
	<script>
	function OnSubmitForm(){
		if(document.pressed == "Edit Resident"){
			document.residentform.action ="<?php echo base_url();?>index.php/residentController/loadEditResidentView/";
			return true;
		}else if(document.pressed == "Delete Resident"){
			if(confirm("Are you sure you want to delete?")){
				document.residentform.action ="<?php echo base_url();?>index.php/residentController/deleteResident/";
				return true;
			}
		}else if(document.pressed == "Back to Main"){
			document.residentform.action ="<?php echo base_url();?>index.php/adminPageController/";
			return true;
		}
	}
	</script>
	
</head>

<body>

<div class="demo">
	
	<div id="header"><h1>ACCI eXtreme Information System</h1></div>
	
	<div id="tabs">
	
		<ul>
			<li><a href="#tabs-1">Home</a></li>
			<li><a href="#tabs-2">Contact</a></li>
			<li><a href="#tabs-3">Developer</a></li>
		</ul>
		
		<div id="tabs-1">
		
			<table>
			<tr>
				<td>
					<h3>Resident's Information</h3>
					<?php $row = $data->row();?>
					<div id="content">

						<h3><a href="#section1">Basic Information</a></h3>
						<div>
							<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Student Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->student_number;?>"/></td></tr>
								<tr><td>First Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->first_name;?>"/></td></tr>
								<tr><td>Middle Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->middle_name;?>"/></td></tr>
								<tr><td>Last Name:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->last_name;?>"/></td></tr>
								<tr><td>Gender:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->gender;?>"/></td></tr>
								<tr><td>Civil Status:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->civil_status;?>"/></td></tr>
								<tr><td>Birthday:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->birthday;?>"/></td></tr>
								<tr><td>Religion:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->religion;?>"/></td></tr>
							</table>
						</div>
						
						<h3><a href="#section2">College and Contact Information</a></h3>
						<div>
							<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Course:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->course;?>"/></td></tr>
								<tr><td>College:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->college;?>"/></td></tr>
								<tr><td>Classification:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->classification;?>"/></td></tr>
								<tr><td>Home Address:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->home_address;?>"/></td></tr>
								<tr><td>Telephone Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telephone_number;?>"/></td></tr>
								<tr><td>Email Address:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->email_address;?>"/></td></tr>
								<tr><td>Region:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->region;?>"/></td></tr>
							</table>
						</div>
						
						<h3><a href="#section3">Other Information</a></h3>
						<div>
							<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Name of Father:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_father;?>"/></td></tr>
								<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_father;?>"/></td></tr>
								<tr><td>Name of Mother:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_mother;?>"/></td></tr>
								<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_mother;?>"/></td></tr>
								<tr><td>Guardian:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->name_of_guardian;?>"/></td></tr>
								<tr><td>Contact Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->telnumber_of_guardian;?>"/></td></tr>
							</table>
						</div>
						
					</div><!-- End content -->
					<br/>
					<form name="residentform" method="post" onSubmit="return OnSubmitForm();">
						<input type="hidden" value="<?php echo $row->student_number;?>" name="student_number"/>
						<input type="submit" value="Edit Resident" class="shortobject" onClick="document.pressed=this.value"/>
						<input type="submit" value="Delete Resident" class="shortobject" onClick="document.pressed=this.value"/>
						<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
					</form>
					
					<h3>Dormitory Stuffs</h3>
					<div id="dormitorystuffs">
					
						<h3><a href="#section1">Appliances</a></h3>
						<div>
							<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Student Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->student_number;?>"/></td></tr>
							</table>
						</div>
						
						<h3><a href="#section1">Payments</a></h3>
						<div>
							<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Student Number:</td><td><input type="text" disabled="true" class="longobject2" value="<?php echo $row->student_number;?>"/></td></tr>
							</table>
						</div>
						
					</div><!-- End dormitorystuffs -->
				</td>
				
				<td>
					<div id="navigation">
					
						<h3><a href="#section1">Residents</a></h3>
						<div>
							Functionalities:<br/>
							<ul>
								<li><?php echo anchor('residentController/loadAddResidentView/','Add a Resident')?><br/></li>
								<li><?php echo anchor('residentController/loadResidentToSearchView/','Search a Resident')?><br/></li>
							</ul>
						</div>
						
						<h3><a href="#section2">Reports</a></h3>
						<div>
							Functionalities:<br/>
							<ul>
								<li><?php echo anchor('reportController/loadView/','Accomodation Tally')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Vacancy Tally')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per Classification')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per College')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per Regional Distribution')?><br/></li>
							</ul>
						</div>
						
					</div><!-- End navigation -->
				</td>
			</tr>
			
			</table>
			
		</div><!-- End tabs-1 -->
		
		<div id="tabs-2"><p>Morbi tincidunt</p></div><!-- End tabs-2 -->
		
		<div id="tabs-3"><p>Mauris eleifend</p></div><!-- End tabs-3 -->
		
	</div><!-- End tabs -->
					
</div><!-- End demo -->

</body>
</html>
